﻿<Serializable()> _
Public Class EmodeloInmueble

#Region "           Atributos                       "
    Private _idProyecto As Int32
    Private _idEtapa As Int32
    Private _idModelo As Int32
    Private _nomModelo As String
    Private _tpoInmueble As EtpoInmueble
    Private _areaTerrModelo As Decimal
    Private _areaTechada As Decimal
    Private _areaConstruida As Decimal
    Private _areaVendible As Decimal
    Private _ascensorDirecto As Int16
    Private _nroHabitaciones As Int32
    Private _nroBaños As Int32
    Private _patioJardin As Int16
    Private _areaPatio As Decimal
    Private _imagen As String
    Private _observacion As String
    Private _estado As String
    Private _descEstado As String
    Private _idUsuario As Int32

    '******* RptGerenciales xModelos *******'
    Private _cantidad As Int32
    Private _porcentaje As Decimal
#End Region

#Region "           Propiedades                     "
    Public Property idProyecto() As Int32
        Get
            Return _idProyecto
        End Get
        Set(ByVal value As Int32)
            _idProyecto = value
        End Set
    End Property
    Public Property idEtapa() As Int32
        Get
            Return _idEtapa
        End Get
        Set(ByVal value As Int32)
            _idEtapa = value
        End Set
    End Property
    Public Property idModelo() As Int32
        Get
            Return _idModelo
        End Get
        Set(ByVal value As Int32)
            _idModelo = value
        End Set
    End Property
    Public Property nomModelo() As String
        Get
            Return _nomModelo
        End Get
        Set(ByVal value As String)
            _nomModelo = value
        End Set
    End Property
    Public Property EtpoInmueble() As EtpoInmueble
        Get
            Return _tpoInmueble
        End Get
        Set(ByVal value As EtpoInmueble)
            _tpoInmueble = value
        End Set
    End Property
    Public Property areaTerrModelo() As Int32
        Get
            Return _areaTerrModelo
        End Get
        Set(ByVal value As Int32)
            _areaTerrModelo = value
        End Set
    End Property
    Public Property areaTechada() As Decimal
        Get
            Return _areaTechada
        End Get
        Set(ByVal value As Decimal)
            _areaTechada = value
        End Set
    End Property
    Public Property areaConstruida() As Decimal
        Get
            Return _areaConstruida
        End Get
        Set(ByVal value As Decimal)
            _areaConstruida = value
        End Set
    End Property
    Public Property areaVendible() As Decimal
        Get
            Return _areaVendible
        End Get
        Set(ByVal value As Decimal)
            _areaVendible = value
        End Set
    End Property
    Public Property ascensorDirecto() As Int16
        Get
            Return _ascensorDirecto
        End Get
        Set(ByVal value As Int16)
            _ascensorDirecto = value
        End Set
    End Property
    Public Property nroHabitaciones() As Int32
        Get
            Return _nroHabitaciones
        End Get
        Set(ByVal value As Int32)
            _nroHabitaciones = value
        End Set
    End Property
    Public Property nroBaños() As Int32
        Get
            Return _nroBaños
        End Get
        Set(ByVal value As Int32)
            _nroBaños = value
        End Set
    End Property
    Public Property patioJardin() As Int16
        Get
            Return _patioJardin
        End Get
        Set(ByVal value As Int16)
            _patioJardin = value
        End Set
    End Property
    Public Property areaPatio() As Decimal
        Get
            Return _areaPatio
        End Get
        Set(ByVal value As Decimal)
            _areaPatio = value
        End Set
    End Property
    Public Property imagen() As String
        Get
            Return _imagen
        End Get
        Set(ByVal value As String)
            _imagen = value
        End Set
    End Property
    Public Property observacion() As String
        Get
            Return _observacion
        End Get
        Set(ByVal value As String)
            _observacion = value
        End Set
    End Property
    Public Property estado() As String
        Get
            Return _estado
        End Get
        Set(ByVal value As String)
            _estado = value
        End Set
    End Property
    Public Property descEstado() As String
        Get
            Return _descEstado
        End Get
        Set(ByVal value As String)
            _descEstado = value
        End Set
    End Property
    Public Property idUsuario() As Int32
        Get
            Return _idUsuario
        End Get
        Set(ByVal value As Int32)
            _idUsuario = value
        End Set
    End Property

    '******* RptGerenciales xModelos *******'
    Public Property cantidad() As Int32
        Get
            Return _cantidad
        End Get
        Set(ByVal value As Int32)
            _cantidad = value
        End Set
    End Property
    Public Property porcentaje() As Decimal
        Get
            Return _porcentaje
        End Get
        Set(ByVal value As Decimal)
            _porcentaje = value
        End Set
    End Property
#End Region

#Region "           Propiedades Avanzadas           "
    Public ReadOnly Property NombreTpoInmueble() As String
        Get
            Return nomModelo & " " & EtpoInmueble.descTpoInmueble
        End Get
    End Property
#End Region

#Region "           Contructores                    "
    Public Sub New()

    End Sub
    Public Sub New(ByVal idModelo As Int32, ByVal nomModelo As String)
        Me.idModelo = idModelo
        Me.nomModelo = nomModelo
    End Sub
    Public Sub New(ByVal idModelo As Int32, ByVal nomModelo As String, ByVal idTpoInmueble As Int32, ByVal descTpoInmueble As String)
        Me.idModelo = idModelo
        Me.nomModelo = nomModelo
        _tpoInmueble = New EtpoInmueble(idTpoInmueble, descTpoInmueble)
    End Sub
    Public Sub New(ByVal idProyecto As Int32, ByVal idEtapa As Int32, ByVal idModelo As Int32, ByVal nomModelo As String, _
                   ByVal idTpoInmueble As Int32, ByVal descTpoInmueble As String, ByVal areaTerrModelo As Decimal, ByVal areaTechada As Decimal, _
                   ByVal areaConstruida As Decimal, ByVal areaVendible As Decimal, ByVal ascensorDirecto As Int16, ByVal nroHabitaciones As Int32, _
                   ByVal nroBaños As Int32, ByVal patioJardin As Int16, ByVal areaPatio As Decimal, ByVal imagen As String, _
                   ByVal observacion As String, ByVal estado As String)
        Me.idProyecto = idProyecto
        Me.idEtapa = idEtapa
        Me.idModelo = idModelo
        Me.nomModelo = nomModelo.ToUpper
        _tpoInmueble = New EtpoInmueble(idTpoInmueble, descTpoInmueble)
        Me.areaTerrModelo = areaTerrModelo
        Me.areaTechada = areaTechada
        Me.areaConstruida = areaConstruida
        Me.areaVendible = areaVendible
        Me.ascensorDirecto = ascensorDirecto
        Me.nroHabitaciones = nroHabitaciones
        Me.nroBaños = nroBaños
        Me.patioJardin = patioJardin
        Me.areaPatio = areaPatio
        Me.imagen = imagen
        Me.observacion = observacion
        Me.estado = estado
        Me.descEstado = IIf(estado = 1, "HABILITADO", "DESHABILITADO")
    End Sub

    '******* RptGerenciales xModelos *******'
    Public Sub New(ByVal idModelo As Int32, ByVal nomModelo As String, ByVal cantidad As Int32, ByVal porcentaje As Decimal)
        Me.idModelo = idModelo
        Me.nomModelo = nomModelo
        Me.cantidad = cantidad
        Me.porcentaje = porcentaje
    End Sub
#End Region

End Class
